﻿@using CodeGenerator.Core
@using System.Text
@{
    int count = 0;
    string primaryKey = "";
    TableInfo table = Model.TableInfo;
    string mName = CodeGenerator.Common.Utils.Pascal(Model.Name);
}
using Shengyi.Common;
using Shengyi.Model.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Shengyi.Kefu_ViewModel.Domain.SYWeb
{
    /// <summary>
    /// 列表展示VM
    /// </summary>
    public class @(mName)ListVM:@(mName)Model
    {
        /// <summary>
        /// 创建人
        /// </summary>
        public virtual string CreateUserName { get; set; }

        /// <summary>
        /// 最后更新人
        /// </summary>
        public virtual string UpdateUserName { get; set; }

        //TODO:需要添加其他字段，需要修改Logic
    }

    /// <summary>
    /// 列表页查询条件VM
    /// </summary>
    public class @(mName)ListSearchVM
    {
        //TODO:需要添加其他字段,根据条件添加，需要修改Dao
        @foreach (ColumnInfo column in table.ColumnList)
        {
            if (column.Name != "Id")
            {
                if (!string.IsNullOrEmpty(column.Comments))
                {
                @:/// <summary>
                @:/// @column.Comments
                @:/// </summary>
                }
                @:public virtual string @column.Name { get; set; }
                @:
            }
        }
    }

    public class Edit@(mName)VM : @(mName)Model
    {
        /// <summary>
        /// 创建人
        /// </summary>
        public virtual string CreateUserName { get; set; }
        /// <summary>
        /// 最后更新人
        /// </summary>
        public virtual string UpdateUserName { get; set; }

        //TODO:需要添加其他字段，需要修改Logic
    }
}